package com.deyuanyun.pic.settings.service.base.impl;

import com.deyuanyun.pic.settings.controller.dto.base.DefectInfoDTO;
import com.deyuanyun.pic.settings.controller.dto.base.FeatureTypeDTO;
import com.deyuanyun.pic.settings.controller.dto.base.NewlyTaskDTO;
import com.deyuanyun.pic.settings.mapper.base.CustomBizMsgThresholdMapper;
import com.deyuanyun.pic.settings.service.base.BizMsgThresholdIntefaceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 *  业务阀值客户端调用接口业务接口实现类
 *  @author axiao(xj08.dream@gmail.com)
 *  @date 2016-07-01
 *  @version 1.0
 *  Histroy: [修改人][时间][描述]
 */
@Service
public class BizMsgThresholdIntefaceServiceImpl implements BizMsgThresholdIntefaceService {

    private static final Logger LOGGER = LoggerFactory.getLogger(BizMsgThresholdIntefaceServiceImpl.class);

    @Autowired
    private CustomBizMsgThresholdMapper customBizMsgThresholdMapper;


    @Override
    public List<NewlyTaskDTO> queryNewlyTask(String pipeLineId, String fromPipeValveroomId, String toPipeValveroomId) {
        return customBizMsgThresholdMapper.queryNewlyTask(pipeLineId, fromPipeValveroomId, toPipeValveroomId);
    }

    @Override
    public NewlyTaskDTO queryMetalLoss(String pipeLineId, String taskId, String type) {
        return customBizMsgThresholdMapper.queryMetalLoss(pipeLineId, taskId, type);
    }

    @Override
    public List<FeatureTypeDTO> countFeatureType(String pipeLineId, BigDecimal beginMileage, BigDecimal endMileage) {
        return customBizMsgThresholdMapper.countFeatureType(pipeLineId, beginMileage, endMileage);
    }

    @Override
    public List<DefectInfoDTO> queryImmeRepairDefects(String pipeLineId, BigDecimal beginMileage, BigDecimal endMileage) {
        return customBizMsgThresholdMapper.queryImmeRepairDefects(pipeLineId, beginMileage, endMileage);
    }

    @Override
    public DefectInfoDTO queryTheFirstDefect(List<String> defectIds) {
        return customBizMsgThresholdMapper.queryTheFirstDefect(defectIds);
    }
}
